﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EBA.MQ
{
    /// <summary>
    /// 路由表 {SMS:tcp:=//192.168.102.1:5505,tcp:=//192.168.102.1:5005}
    ///       {E-mail:tcp:=//192.168.102.1:5505,tcp:=//192.168.102.1:5005}
    /// </summary>
    public class RouteListPayLoad : IPayLoad
    {

        public string Name
        {
            get;
            set;
        }

        public List<string> Addresses
        {
            get;
            set;
        }



        /// <summary>
        /// 序列化
        /// </summary>
        /// <returns></returns>
        public string Serialize()
        {
            string message = "";
            //foreach (var route in Routes)
            //{
            //    message += "{" + route.Key + ":" + string.Join(",", route.Value.ToArray()) + "}";
            //}
            return message;
        }

        /// <summary>
        /// 反序列化
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public IPayLoad Deserialize(string message)
        {
            
            return this;
        }
    }
}
